//
//  Advertising.m
//  HotWord
//
//  Created by Rainbow on 1/18/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "Advertising.h"

@implementation Advertising

@synthesize adId;
@synthesize title;
@synthesize summary;
@synthesize details;
@synthesize adUrl;
@synthesize category;
@synthesize createTime;

@synthesize imageUrl;

- (void)encodeWithCoder:(NSCoder *)aCoder
{
	[aCoder encodeObject:self.adId forKey:@"adId"];
	[aCoder encodeObject:self.title forKey:@"title"];
	[aCoder encodeObject:self.summary forKey:@"summary"];
	[aCoder encodeObject:self.details forKey:@"details"];
	[aCoder encodeObject:self.adUrl forKey:@"adUrl"];
	[aCoder encodeObject:self.category forKey:@"category"];
	[aCoder encodeObject:self.createTime forKey:@"createTime"];
    
    [aCoder encodeObject:self.imageUrl forKey:@"imageUrl"];

}

- (id)initWithCoder:(NSCoder *)aDecoder
{
	if ([self init]) {
		self.adId= [aDecoder decodeObjectForKey:@"adId"];
		self.title = [aDecoder decodeObjectForKey:@"title"];
		self.summary = [aDecoder decodeObjectForKey:@"summary"];
		self.details= [aDecoder decodeObjectForKey:@"details"];
		self.adUrl= [aDecoder decodeObjectForKey:@"adUrl"];
		self.category= [aDecoder decodeObjectForKey:@"category"];
		self.createTime= [aDecoder decodeObjectForKey:@"createTime"];
        
        self.imageUrl= [aDecoder decodeObjectForKey:@"imageUrl"];

    }
	return self;
}

-(void)dealloc
{
    [adId release];
    [title release];
    [summary release];
    [details release];
    [adUrl release];
    [category release];
    [createTime release];
    
    [imageUrl release];
    [super dealloc];
}


@end
